﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>

<script type="text/javascript">
    var webstore;

    $(function() {
        var store = $("#webstore");
        var auth = $("#webauth").val() == 'manager';
        var ext = ".rar .zip .doc .xls .bmp .png .jpeg .gif .txt .jpg .pdf";
        var rootpath = $("#storerootpath").val();
        webstore = $.fn.webstore({
            renderTo: store,
            initializeUrl: "/WebStore/GetFolders",
            sharelandUrl: "/WebStore/GetShareFilders",
            managerlandUrl: "/WebStore/GetUserFolders",
            newfolderUrl: "/WebStore/CreateFolder",
            delfolderUrl: "/WebStore/DelelteFolder",
            updatefolderUrl: "/WebStore/ChangeFolder",
            renamefolderUrl: "/WebStore/RenameFolder",
            uploadfileUrl: "/WebStore/UploadFile",
            deletefileUrl: "/WebStore/DeleteFile",
            downloadfileUrl: "/WebStore/DownloadFile",
            sharefileUrl: "/WebStore/ShareFiles",
            sharefolderUrl: "/WebStore/ShareFolders",
            renamefileUrl: "/WebStore/RenameFile",
            unsharefileUrl: "/WebStore/UnshareFile",
            storestreeUrl: "/WebStore/GetStoreTree",
            storeusertreeUrl: "/Home/getDeptUserCheckTree",
            movefileUrl: "/WebStore/MoveFile",
            readfileUrl: "/WebStore/ReadFile",
            copyshareUrl: "/WebStore/CopyShareFile",
            movefolderUrl: "/WebStore/MoveFolder",
            searchfileUrl: "/WebStore/GetFolders4Search",
            storerootPath: rootpath,
            uploadextension: ext,
            userId: $("#userid").val(),
            ismanager: auth
        });
        // 初始化网盘内容

        $(webstore).initialize();
    });
</script>

<div id="webstore">
</div>
<div id="hiddenland">
    <input id='userid' type="hidden" value="<%=ViewData["userId"] %>" />
    <input id='webauth' type="hidden" value="<%=ViewData["auth"] %>" />
    <input id="storerootpath" type="hidden" value="<%=ViewData["rootPath"] %>" />
</div>
